home *** CD-ROM | disk | FTP | other *** search
- Path: dildog.lgc.com!not-for-mail
- From: mrovak@lgc.com (Mike.Rovak)
- Newsgroups: comp.lang.c
- Subject: Re: borland c 4.5
- Date: 12 Mar 1996 10:52:28 -0600
- Organization: tulsa.lgc.com
- Message-ID: <4i4a4c$8fq@tulsa.lgc.com>
- References: <4h9u5k$ecj@rzsun02.rrz.uni-hamburg.de> <4i0gf9$4l0@mirv.unsw.edu.au>
- NNTP-Posting-Host: aris.tulsa.lgc.com
-
- In article <4i0gf9$4l0@mirv.unsw.edu.au>,
- John Natschev <j.natschev@unsw.edu.au> wrote:
- >mleusch@rzdspc1.informatik.uni-hamburg.de (Michael Leuschner) wrote:
- >
- >
- >>We have a problem concerning Borland C++ 4.5 and hope somebody will be able to
- >>help us...
- >
- >>We developed a program in C++ with the IDE enviroment and the App Expert and
- >>have no problem with that. Now we want to add some C source code but were
- >>not successful. It seems that the c++ compiler is able to compile our
- >>ANSI c sources but later the linker can't manage to link the mix of
- >>c++ and c together...
- >
- >>Does anyone have a clue?
- >>Is the a known problem (and how can you solve it) ?
- >
- >>--Michael
- >>University of Hamburg, Germany
- >
- >i would say name mangling also.
- >the borland c 4.5 programmers guide suggests ways to solve this
- >problem. can't remember which page.
- >John Natschev
- >Library Systems
- >University of New South Wales
- >
-
- You must turn off name-mangling for references to your C functions in
- the C++ source. I'm not sure about the syntax in Borland C++, but for
- Microsoft it goes like this:
-
- // mysource.cpp
-
- extern "C" {
- C-function-prototype;
- C-function-prototype;
- }
-
- You get the idea. Then, the linker should be able to resolve the
- references.
-
- -- Mike
-
- ------------------------------------------------------------------------
- Disclaimer: My opinions do not necessarily reflect those of my employer.
- ========================================================================
- ------------------------------------------------------------------------
- mrovak@tulsa.lgc.com
-
- ========================================================================
-